1. Field of the Invention
This invention relates to computer system input/output (I/O) and, more particularly, to transaction handling in an I/O node.
2. Description of the Related Art
In a typical computer system, one or more processors may communicate with input/output (I/O) devices over one or more buses. The I/O devices may be coupled to the processors through an I/O bridge which manages the transfer of information between a peripheral bus connected to the I/O devices and a shared bus connected to the processors. Additionally, the I/O bridge may manage the transfer of information between a system memory and the I/O devices or the system memory and the processors.
Unfortunately, many bus systems suffer from several drawbacks. For example, multiple devices attached to a bus may present a relatively large electrical capacitance to devices driving signals on the bus. In addition, the multiple attach points on a shared bus produce signal reflections at high signal frequencies which reduce signal integrity. As a result, signal frequencies on the bus are generally kept relatively low in order to maintain signal integrity at an acceptable level. The relatively low signal frequencies reduce signal bandwidth, limiting the performance of devices attached to the bus.
Lack of scalability to larger numbers of devices is another disadvantage of shared bus systems. The available bandwidth of a shared bus is substantially fixed (and may decrease if adding additional devices causes a reduction in signal frequencies upon the bus). Once the bandwidth requirements of the devices attached to the bus (either directly or indirectly) exceeds the available bandwidth of the bus, devices will frequently be stalled when attempting access to the bus, and overall performance of the computer system including the shared bus will most likely be reduced. An example of a shared bus used by I/O devices is a peripheral component interconnect (PCI) bus.
Many I/O bridging devices use a buffering mechanism to buffer a number of pending transactions from the PCI bus to a final destination bus. However buffering may introduce stalls on the PCI bus. Stalls may be caused when a series of transactions are buffered in a queue and awaiting transmission to a destination bus and a stall occurs on the destination bus, which stops forward progress. Then a transaction that will allow those waiting transactions to complete arrives at the queue and is stored behind the other transactions. To break the stall, the transactions in the queue must somehow be reordered to allow the newly arrived transaction to be transmitted ahead of the pending transactions. Thus, to prevent scenarios such as this, the PCI bus specification prescribes a set of reordering rules that govern the handling and ordering of PCI bus transactions.
To overcome some of the drawbacks of a shared bus, some computers systems may use packet-based communications between devices or nodes. In such systems, nodes may communicate with each other by exchanging packets of information. In general, a xe2x80x9cnodexe2x80x9d is a device which is capable of participating in transactions upon an interconnect. For example, the interconnect may be packet-based, and the node may be configured to receive and transmit packets. Generally speaking, a xe2x80x9cpacketxe2x80x9d is a communication between two nodes: an initiating or xe2x80x9csourcexe2x80x9d node which transmits the packet and a destination or xe2x80x9ctargetxe2x80x9d node which receives the packet. When a packet reaches the target node, the target node accepts the information conveyed by the packet and processes the information internally. A node located on a communication path between the source and target nodes may relay or forward the packet from the source node to the target node.
Additionally, there are systems that use a combination of packet-based communications and bus-based communications. For example, a system may connect to a PCI bus and a graphics bus such as AGP. The PCI bus may be connected to a packet bus interface that may then translate PCI bus transactions into packet transactions for transmission on a packet bus. Likewise the graphics bus may be connected to an AGP interface that may translate AGP transactions into packet transactions. Each interface may communicate with a host bridge associated with one of the processors or in some cases to another peripheral device.
When PCI devices initiate the transactions, the packet-based transactions may be constrained by the same ordering rules as set forth in the PCI Local Bus specification. The same may be true for packet transactions destined for the PCI bus. These ordering rules are still observed in the packet-based transactions since transaction stalls that may occur at a packet bus interface may cause a deadlock at that packet bus interface. This deadlock may cause further stalls back into the packet bus fabric. In addition, AGP transactions may follow a set of transaction ordering rules to ensure proper delivery of data.
Depending on the configuration of the I/O nodes, transactions may be forwarded through a node to another node either in a direction to the host bridge or away from the host bridge. Alternatively, transactions may be injected into packet traffic at a particular node. In either scenario, an I/O node architecture that may control the transactions as the transactions are sent along the communication path may be desirable.
Various embodiments of a tagging and arbitration mechanism in an input/output node of a computer system are disclosed. In one embodiment, a mechanism for tagging commands in an input/output node of a computer system includes a tag circuit configured to receive a plurality of control commands. The tag circuit may also be configured to generate a tag value for each of the control commands. The tagging mechanism may also include a buffer circuit which is coupled to the tag circuit. The buffer circuit may include a plurality of buffers each corresponding to a respective virtual channel of a plurality of virtual channels for storing selected control commands that belong to the respective virtual channel. Further the tagging mechanism may include an arbitration circuit that is coupled to the buffer circuit and is configured to arbitrate between the plurality of buffers depending upon the tag value for each of the control commands.
In one particular implementation the tag value for each of the control commands is a value indicative of an order of receipt by the tag circuit of each control command relative to other control commands. The plurality of virtual channels includes a posted channel, a non-posted channel and a response channel. The tag circuit may be configured to generate the tag value for each of the control commands using a current value of a counter associated with the response channel and a current value of counter associated with the non-posted channel.
In another implementation, the tag circuit may be configured to assign the tag value corresponding to the current value of the counter associated with the response channel to each of the control commands associated with the response channel. The tag circuit may also be configured to assign the tag value corresponding to the current value of the counter associated the non-posted channel to each of the control commands associated with the non-posted channel. The tag circuit may also be configured to assign the tag value corresponding to the current value of the counter associated with the response channel and the tag value corresponding to the current value of the counter associated with the non-posted channel to each of the control commands associated with the posted channel. The tag circuit may be configured to increment the counter associated with each of the non-posted and response channels in response to the tag circuit receiving a control command associated with the posted channel preceded by a control command associated with the non-posted and the response command, respectively.
In another implementation, the arbitration circuit may be configured to compare the tag values assigned to the control commands stored in the buffers corresponding to the posted channel and the non-posted channel and to determine if the tag values are equal. The arbitration circuit may also be configured to process the control command stored in the buffer corresponding to the posted channel in response to the tag values being equal and to process the control command stored in the buffer corresponding to the non-posted channel in response to the tag values not being equal.
In yet another implementation, the arbitration circuit may be configured to compare the tag values assigned to the control commands stored in the buffers corresponding to the posted channel and the response channel and to determine if the tag values are equal. The arbitration circuit may also be configured to process the control command stored in the buffer corresponding to the posted channel in response to the tag values being equal and to process the control command stored in the buffer corresponding to the response channel in response to the tag values not being equal.